home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / fgl105c.zip / 09-03.C < prev    next >
Text File  |  1991-05-05  |  516b  |  29 lines

  1. char triangle[] = {
  2.    0x55,0x55,0x40, 0x1A,0xA9,0x00, 0x06,0xA4,0x00,
  3.    0x01,0x90,0x00, 0x00,0x40,0x00
  4.    };
  5.  
  6. main()
  7. {
  8.    int old_mode;
  9.  
  10.    if (fg_testmode(4,1) == 0) {
  11.       printf("This program requires a 320 ");
  12.       printf("x 200 CGA graphics mode.\n");
  13.       exit();
  14.       }
  15.  
  16.    old_mode = fg_getmode();
  17.    fg_setmode(4);
  18.  
  19.    fg_setcolor(7);
  20.    fg_rect(0,319,0,199);
  21.  
  22.    fg_move(156,101);
  23.    fg_drwimage(triangle,3,5);
  24.    fg_waitkey();
  25.  
  26.    fg_setmode(old_mode);
  27.    fg_reset();
  28. }
  29.